<template>
  <div class="home maxwh">
    <component
      v-for="(item, index) in lists"
      :key="index"
      :is="item['component']"
    />
  </div>
</template>

<script>
import { pageLists } from '../../utils/project-pageList'
export default {
  name: 'sfs-home',
  data() {
    return {}
  },
  computed: {
    lists() {
      return this.getLists()
    },
  },
  mounted() {},
  methods: {
    getLists() {
      if (pageLists[0]?.children?.length) {
        if (pageLists[0]['children']) {
          pageLists[0]['children'].forEach((item) => {
            item.component = () =>
              import(`@/${item.path}/views/${item.basePath}`)
          })
          return pageLists[0]['children']
        }
      } else {
        return []
      }
    },
  },
}
</script>

<style lang="less" scoped>
.home {
  display: flex;
}
</style>
